﻿using Core.Domain.Customers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Services.Customers
{
    /// <summary>
    /// 用户注册服务接口
    /// </summary>
    public partial interface ICustomerRegistrationService
    {
        /// <summary>
        /// 验证用户
        /// </summary>
        /// <param name="loginName"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        CustomerLoginResults ValidateCustomer(string loginName, string password);
        /// <summary>
        /// 注册用户
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        CustomerRegistrationResult RegisterCustomer(CustomerRegistrationRequest request);
        /// <summary>
        /// 更改密码
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        PasswordChangeResult ChangePassword(ChangePasswordRequest request);
        /// <summary>
        /// 设置邮箱
        /// </summary>
        /// <param name="customer"></param>
        /// <param name="newEmail"></param>
        void SetEmail(Customer customer, string newEmail);
        /// <summary>
        /// 设置手机号
        /// </summary>
        /// <param name="customer"></param>
        /// <param name="newPhone"></param>
        void SetPhone(Customer customer, string newPhone);
        /// <summary>
        /// 设置用户名
        /// </summary>
        /// <param name="customer"></param>
        /// <param name="newUsername"></param>
        void SetUsername(Customer customer, string newUsername);
    }
}
